1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method for carrying out the fine enlargement/reduction of an image.
2. Description of Related Art
Conventionally, when the image processing apparatus carries out the fine enlargement or the fine reduction of an image in the printing, a method for reducing or enlarging an image so as to limit the number of pixels to be processed in order to maintain the original image quality (maintain the sharpness of an image or the like), for example, a method for inserting or deleting pixels at regular intervals, is used.
In this case, for example, when a dot matrix type of image having pixels arranged in a matrix in two directions perpendicular to each other (one direction is the main scanning direction (or horizontal direction, line direction) and the other is the sub-scanning direction (or vertical direction)) is enlarged or reduced in the sub-scanning direction, in the simple nearest neighbor algorithm, as shown in FIGS. 14A and 14B, the pixels are concurrently inserted in (or deleted from) each line (along the main scanning direction) which is arranged in the interpolation cycle. FIG. 14B shows the example in which the original image shown in FIG. 14A is enlarged in the sub-scanning direction by 8/7 times. In FIG. 14B, pixels constituting one line are inserted at intervals of seven lines.
When the reduction/enlargement is carried out by the above method, the pixel inserting positions or the pixel deleting positions are arranged in each line. Therefore, a certain type of regularity is caused, and the texture is caused. In particular, in an image in which the thin lines are arranged at regular intervals, or in an image for which the screen treatment has been carried out, the shift of the lines, the density ununiformity and the like are markedly caused as the texture. For example, when the original image having the stripe pattern shown in FIG. 15A is enlarged by the method shown in FIGS. 14A and 14B, the texture in which the stripe lines periodically become thick is markedly caused as shown in FIG. 15B. Therefore, various technologies for obscuring the above texture have been proposed.
For example, the technology for determining the pixel inserting positions by using the pseudorandom numbers is disclosed (See Japanese Patent Application Publication No. 2008-99114). For example, FIG. 16 shows an example of the arrangement of the pixel inserting positions determined by the pseudorandom numbers. In the above nearest neighbor algorithm, the inserted pixels constituting one line in the main scanning direction are arranged in the interpolation cycle. On the other hand, in FIG. 16, each inserted pixel corresponding to one line is distributed in the sub-scanning direction by the pseudorandom numbers at random within the interpolation cycle. When the pixel inserting positions are distributed by the pseudorandom numbers at random, the regularity of the pixel inserting positions is lost. Therefore, it is possible to prevent the texture from being caused as compared with the above nearest neighbor algorithm.
However, in the method disclosed in Japanese Patent Application Publication No. 2008-99114, when the pixel inserting positions are determined by the pseudorandom numbers, there is some possibility that two pixel inserting positions which are adjacent in the main scanning direction are largely apart from each other in the sub-scanning direction. In an example shown in FIGS. 17A and 17B (FIG. 17A shows the original image and FIG. 17B shows the image in which the pixels are inserted in accordance with the pseudorandom numbers), the inserted pixel 31a and the inserted pixel 31b are largely apart from each other in the sub-scanning direction as shown in the part enclosed by a dashed line 32. In this part, because the discontinuity of the image is widely caused in the sub-scanning direction, the texture, such as the local density deterioration which forms longitudinal lines (white lines) is caused.
In order to solve the above problem, it is considered that the distance between two pixel inserting positions which are adjacent in the main scanning direction is limited within a certain range so as to prevent the two pixel inserting positions from being largely apart from each other in the sub-scanning direction. However, when only the above distance is limited within a certain range, another type of image quality deterioration is caused. FIG. 18 shows an example in which the inserted pixels are arranged. In FIG. 18, the distance in the sub-scanning direction between two pixel inserting positions which are adjacent in the main scanning direction is fixed to two pixels and the sub-scanning direction in which the two pixel inserting positions are apart from each other is reversed between the plus direction and the minus direction at intervals of four pixels in the main scanning direction.
FIG. 19A shows the original image having the horizontal stripes. FIG. 19B shows the image obtained by enlarging the original image of FIG. 19A so as to arrange the inserted pixels by fixing the distance in the sub-scanning direction between two pixel inserting positions which are adjacent in the horizontal direction (main scanning direction), to two pixels without reversing the sub-scanning direction in which the two pixel inserting positions are apart from each other. In the example of FIG. 19B, the discontinuity which is visually recognized as the unevenness with respect to the horizontal line is caused. FIGS. 20A to 20D also show the similar example. FIG. 20A shows the original image having the horizontal stripes. FIG. 20B shows the pixel inserting positions. In FIG. 20B, the pixel inserting positions are arranged so as to ramp down the pixel inserting positions from the left upper portion of the image by one pixel at intervals of four pixels in the horizontal direction. FIG. 20C shows the state in which the dummy pixels are inserted into the pixel inserting positions of FIG. 20B in the original image of FIG. 20A. FIG. 20D shows the final enlarged image which is obtained by determining the pixel value of each dummy pixel in accordance with the peripheral pixels thereof. In the example of FIGS. 20A to 20D, the texture in which the unevenness is formed with respect to the horizontal line is caused.